﻿<UserControl x:Class="WpfPersianDatePickerUsage.Views.TestView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"              
             xmlns:dp="clr-namespace:WpfPersianDatePicker.Views;assembly=WpfPersianDatePicker" 
             xmlns:ViewModels="clr-namespace:WpfPersianDatePickerUsage.ViewModels" 
             FlowDirection="RightToLeft" FontFamily="Tahoma" FontSize="11"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ViewModels:TestViewViewModel x:Key="vmTestViewViewModel" />
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" 
          DataContext="{Binding Source={StaticResource vmTestViewViewModel}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="116" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock  Margin="5"  Text="نام كاربر"  />
        <TextBlock Grid.Row="1" Margin="5"  Text="اعتبار حساب كاربري تا"  />

        <TextBox Grid.Column="1" 
                 Margin="5" Text="{Binding User.Name, Mode=TwoWay}" />
        <dp:PDatePicker                 
                TextBoxWidth="100"
                SelectedDate="{Binding User.AccountValidTo, Mode=TwoWay}"
                Grid.Column="1" 
                Grid.Row="1" 
                Margin="5"
                VerticalAlignment="Top"
                TextBoxIsReadOnly="False"
                />
    </Grid>
</UserControl>
